const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('sunnyUserOther', {
    id: {
      type: DataTypes.BIGINT,
      allowNull: false,
      primaryKey: true,
      comment: "主键"
    },
    userId: {
      type: DataTypes.BIGINT,
      allowNull: true,
      defaultValue: 0,
      comment: "用户ID",
      field: 'user_id'
    },
    userExt: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "用户拓展信息",
      field: 'user_ext'
    }
  }, {
    sequelize,
    tableName: 'sunny_user_other',
    timestamps: true,
    createdAt: 'createTime',
    updatedAt: 'updateTime',
    deletedAt: 'deleteTime',
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
